import 'package:cbec_app/components/base/base_chekbox.dart';
import 'package:cbec_app/components/base/base_nav_bar.dart';
import 'package:cbec_app/components/base/base_page.dart';
import 'package:cbec_app/components/common/common_style.dart';
import 'package:cbec_app/utils/Tools.dart';
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';

//账户注销
class DestoryAccount extends StatelessWidget {
  const DestoryAccount({super.key});

  @override
  Widget build(BuildContext context) {
    return BasePage(
      title: "注销账号",
      iconType: IconType.back,
      children: [
        Container(
          margin: EdgeInsets.only(top: 35.w),
          alignment: Alignment.center,
          child: Icon(Icons.error, size: 60, color: Tools.fromHex("#FA5151")),
        ),
        Container(
          margin: EdgeInsets.only(top: 26.w, bottom: 20.w),
          padding: EdgeInsets.only(left: 18.w, right: 18.w),
          child: Text(
              "注销账号是不可恢复的操作，注销后你的账号中的个人订单、积分、会员等等虚拟财产等内容都将无法被找回。操作前请确认以上信息均已妥善处理。",
              style:
                  setTextStyle(12, FontWeight.w400, Tools.fromHex("#666666"))),
        ),
        Container(
          decoration: border_radis(Colors.white),
          margin: EdgeInsets.only(left: 8.w,right: 8.w,bottom: 10.w),
          padding: EdgeInsets.all(10.w),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text("1、账号处于安全状态",style: setTextStyle(13, FontWeight.w500, Tools.fromHex("#333333"))),
              SizedBox(height: 4.h),
              Text("最近两周内，你没有进行修改密码、修改绑定手机号等敏感操作且账号无被限制记录。",style: setTextStyle(12, FontWeight.w400, Tools.fromHex("#666666")))
            ],
          ),
        ),
        Container(
          decoration: border_radis(Colors.white),
          margin: EdgeInsets.only(left: 8.w,right: 8.w),
          padding: EdgeInsets.all(10.w),
          child: Column(
            mainAxisAlignment: MainAxisAlignment.start,
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              Text("2、账号财产已结清，没有未完成和/或存在争议的服家",style: setTextStyle(13, FontWeight.w500, Tools.fromHex("#333333"))),
              SizedBox(height: 4.h),
              Text("最账号中没有未结束的付费订单，没有退货中或退款中的订单;没有未处理完成的物流申诉等服务，",style: setTextStyle(12, FontWeight.w400, Tools.fromHex("#666666")))
            ],
          ),
        ),


        Positioned(
          key: GlobalKey(debugLabel:'Positioned'),
          bottom: MediaQuery.of(context).padding.bottom,
          child: Column(
          children: [
            SizedBox(
              width: 375.w,
              child: Row(
              mainAxisAlignment: MainAxisAlignment.center,
              crossAxisAlignment: CrossAxisAlignment.center,
              children: [
                BaseCheckBox(value: false),
                SizedBox(width: 4.w),
                Text("我已阅读并同意",style: setTextStyle(14, FontWeight.w500, Tools.fromHex("#999999"))),
                SizedBox(width: 5.w),
                Text("《注销须知》",style: setTextStyle(14, FontWeight.w500, Tools.fromHex("#333333")))
              ],
            ),
            ),

            SizedBox(height: 20.h),

            Container(
              child: solidButton("继续注销", () { 
                Tools.showModal(title: "",content: "请再次确定是否注销账号，账号注销后，将会删除账号的全部数据无法找回，请谨慎操作！",onCancel: (tag) => {},onConfirm: (tag) => {},);
              }),
            ),

            SizedBox(height: 28.w)
          ],
        ))
      ],
    );
  }
}
